//console viroment has _CONSOLE,MFC has _AFXEXT
#include "StdAfx.h"
#pragma hdrstop 

#include "..\..\inc\dllexport.h"
#include "..\..\inc\thread\Lock.h"

namespace fs
{
	namespace thread
	{

		Lock::~Lock(void)
		{
			if(pLockSection)
				LeaveCriticalSection(&(pLockSection->section));
		}

		Lock::Lock( LockSection* p )
		{
			pLockSection=p;
			if(pLockSection)
				EnterCriticalSection(&(pLockSection->section));
		}

	}
}